#ifndef MEDIATOOLBAR_H
#define MEDIATOOLBAR_H

#include <QObject>
#include <QAction>

#include "IF_MediaEngineInterface.h"

class MediaToolbar : public QObject
{
   Q_OBJECT
private:
   QAction *m_playAction;
   QAction *m_pauseAction;

public:
   MediaToolbar( QAction *playAction, QAction *pauseAction, QObject *parent) :
      QObject(parent),
      m_playAction(playAction),
      m_pauseAction(pauseAction)
   {
      m_playAction->setEnabled( false);
      m_pauseAction->setEnabled( false);
   }

   virtual ~MediaToolbar() {}

public slots:
   void onMediaStateChanged( AudioObject::State newState)
   {
      m_pauseAction->setEnabled( newState == AudioObject::PlayingState);
      m_playAction->setEnabled( newState == AudioObject::PausedState);
   }
};

#endif // MEDIATOOLBAR_H
